package com.heima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.heima.pojo.CollectReport;
import com.heima.pojo.Task;
import com.heima.pojo.TaskReportInfo;
import com.heima.pojo.vo.SearchUserWorkVo;
import com.heima.pojo.vo.TaskVo;
import com.heima.pojo.vo.UserWorkVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface TaskMapper extends BaseMapper<Task> {
    Page<TaskVo> search(Page<TaskVo> page, String start, String end, String innerCode, Integer userId, String taskCode, String status, Boolean isRepair);


    TaskVo taskInfo(Long taskId);

    List<Map<String, Object>> top10();


    TaskReportInfo taskReportInfo(String start, String end, Boolean repair);

    List<CollectReport> collectReport(String start, String end);

    List<Map<String, Object>> userWorkTop10(String start, String end, Boolean isRepair, Long regionId);


    Page<SearchUserWorkVo> searchUserWork(Page<SearchUserWorkVo> page, String userName, Integer roleId, Boolean isRepair);

    UserWorkVo userWork(String start, String end, Integer userId);
}
